﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Asset/EassetMaster.master" AutoEventWireup="true"
    CodeBehind="AssetProcurementForm.aspx.cs" Inherits="Eassets.UI.Asset.AssetProcurementForm" %>
    <%@ Register Src="~/Components/FlashMessage.ascx" TagName="FlashMessage" TagPrefix="osm" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<asp:Content ID="Content3" ContentPlaceHolderID="HeadPlaceHolder" runat="server">
<script type="text/javascript" language="javascript">
    function handleNumbersOnly(e) {
        // Allowed: 0-9 [48-57], "." [46], "," [44], "<backspace>" [8], "<tab>" [9]
        var charCode = (e.which) ? e.which : e.keyCode
        if (charCode != 9) { //Allow tab
            if (charCode > 31 && (charCode < 48 || charCode > 57)) {
                if (charCode == 46 || charCode == 44 || e.which == 0) {
                    return true; //Valid Entry
                }
                else {
                    return false; //Invalid Entry
                }
            }
            else {
                return true; //Valid entry
            }
        }
    }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">

</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
   
    <div class="formtitle">
        <asp:Label ID="labelFormTitle" runat="server" Text="Fixed Asset Procurement"></asp:Label>
         <osm:FlashMessage ID="FlashMessage1" runat="server" />
    </div>
    <fieldset>
        <ul class="form">
            <li>
                <div class="formfield">
                    <table>
                        <tr>
                            <td>
                                <asp:Label ID="labelOrganizationLevel" runat="server" Text="Organization Level List"
                                    CssClass="legendlabel_size1"></asp:Label>
                                <asp:DropDownList ID="dropDownListOrganizationLevelList" runat="server" CssClass="select"
                                    AutoPostBack="True" AppendDataBoundItems="true" OnSelectedIndexChanged="dropDownListOrganizationLevelList_SelectedIndexChanged">
                                    <asp:ListItem Value="0" Text="-Select-" Selected="True"></asp:ListItem>
                                 
                                </asp:DropDownList>
                            </td>
                            <td>
                            </td>
                            <td>
                            </td>
                            <td align="right" width="">
                                <asp:Label ID="labelTransactionNo" runat="server" Text="Transaction No" CssClass="legendlabel_size1"></asp:Label>
                                <asp:DropDownList ID="dropDownListTransactionNo" runat="server" CssClass="select"
                                    AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="dropDownListTransactionNo_SelectedIndexChanged">
                                    <asp:ListItem Value="0" Text="-Select-"></asp:ListItem>
                                 
                                </asp:DropDownList>
                            </td>
                        </tr>
                    </table>
                </div>
            </li>
        </ul>
        <ul class="form">
            <li>
                <div class="formfield">
                    <table>
                        <tr>
                            <td>
                                <asp:Label ID="labelSupplierCode" runat="server" Text="Supplier Code" CssClass="legendlabel_size1"></asp:Label>
                                <asp:DropDownList ID="dropDownListSupplierCod" runat="server" CssClass="select" AutoPostBack="true" AppendDataBoundItems="true">
                                    <asp:ListItem Value="" Text="-Select-"></asp:ListItem>
                                    <%-- <asp:ListItem Value="1" Text="Furniture"></asp:ListItem>
                        <asp:ListItem Value="2" Text="Hardware"></asp:ListItem>--%>
                                </asp:DropDownList>
                            </td>
                            <td>
                            </td>
                          
                        </tr>
                    </table>
                </div>
            </li>
        </ul>
    </fieldset>
    <br />
    <fieldset>
        <ul class="form">
            <li>
                <div>
                    <asp:GridView ID="gridViewAquisitionItems" runat="server" Caption="Aquisition Items"
                        CssClass="ColStyle" EmptyDataText="No data to display" AllowPaging="True" PageSize="10"
                        AutoGenerateColumns="false" Width="100%">
                        <RowStyle CssClass="RowStyle" />
                        <AlternatingRowStyle CssClass="AltRowStyle" />
                        <HeaderStyle CssClass="GridHeader" />
                        <SelectedRowStyle CssClass="SelectedRowStyle" />
                        <Columns>
                            <asp:CommandField ItemStyle-Width="20" ShowSelectButton="True" ButtonType="Image"
                                SelectImageUrl="~/styles/images/Select_icon_button.gif" />
                           
                            <asp:BoundField HeaderText="Asset" DataField="AssetCode" ItemStyle-Width="120" ItemStyle-HorizontalAlign="Left" />
                            <asp:BoundField HeaderText="PurchaseQuantity" DataField="SerialQuantity" ItemStyle-Width="120"
                                ItemStyle-HorizontalAlign="Right" />
                            <asp:BoundField HeaderText="UnitCost" DataField="UnitPrice" ItemStyle-Width="120" />
                            <asp:BoundField HeaderText="TotalCost" DataField="TotalPrice" ItemStyle-Width="120" />
                        </Columns>
                    </asp:GridView>
                </div>
            </li>
        </ul>
    </fieldset>
    <br />
    <fieldset>
        <ul class="form">
            <li>
                <div>
                    <ul class="form">
                        <li>
                            <div class="formfield">
                                <asp:Label ID="labelMainCategory" runat="server" Text="Main Category" CssClass="legendlabel_size1"></asp:Label>
                                <asp:DropDownList ID="dropDownListMainCategory" runat="server" CssClass="select"
                                    AutoPostBack="true" OnSelectedIndexChanged="dropDownListMainCategory_SelectedIndexChanged" AppendDataBoundItems="true">
                                    <asp:ListItem Value="" Text="Furniture"></asp:ListItem>
                                   
                                </asp:DropDownList>
                            </div>
                        </li>
                    </ul>
                    <ul class="form">
                        <li>
                            <div class="formfield">
                                <asp:Label ID="labelSubCategory" runat="server" Text="Sub Category" CssClass="legendlabel_size1"></asp:Label>
                                <asp:DropDownList ID="dropDownListSubCategory" runat="server" CssClass="select"
                                    AutoPostBack="true" OnSelectedIndexChanged="dropDownListSubCategory_SelectedIndexChanged" AppendDataBoundItems="true">
                                    <asp:ListItem Value="" Text="-Select-"></asp:ListItem>
                                  
                                </asp:DropDownList>
                            </div>
                        </li>
                    </ul>
                    <ul class="form">
                        <li>
                            <div class="formfield">
                                <asp:Label ID="labelAsset" runat="server" Text="Asset" CssClass="legendlabel_size1"></asp:Label>
                               <asp:DropDownList ID="dropDownListAsset" runat="server" CssClass="select"
                                    AutoPostBack="true" AppendDataBoundItems="true">
                                    <asp:ListItem Value="" Text="-Select-"></asp:ListItem>
                                  
                                </asp:DropDownList>
                            </div>
                        </li>
                    </ul>
                    <ul class="form">
                        <li>
                            <div class="formfield">
                                <asp:Label ID="labelQuantity" runat="server" Text="Purchased Quantity" CssClass="legendlabel_size1"></asp:Label>
                                <asp:TextBox ID="textBoxQuantity" runat="server" CssClass="textbox_customsize" Width="100px"
                                    MaxLength="8"></asp:TextBox>
                            </div>
                        </li>
                    </ul>
                    <ul class="form">
                        <li>
                            <div class="formfield">
                                <asp:Label ID="labelUnitCost" runat="server" Text="Unit Cost" CssClass="legendlabel_size1"></asp:Label>
                                <asp:TextBox ID="textBoxUnitCost" runat="server" CssClass="textbox_customsize" Width="100px"
                                    MaxLength="8" OnTextChanged="textBoxUnitCost_OnTextChange" AutoPostBack="true"></asp:TextBox>
                            </div>
                        </li>
                    </ul>
                    <ul class="form">
                        <li>
                            <div class="formfield">
                                <asp:Label ID="labelTotalCost" runat="server" Text="Total Cost" CssClass="legendlabel_size1"></asp:Label>
                                <asp:TextBox ID="textBoxTotalCost" runat="server" CssClass="textbox_customsize" Width="100px"
                                    MaxLength="8" ></asp:TextBox>
                            </div>
                        </li>
                    </ul>
                    <ul class="form">
                        <li>
                            <div class="formfield">
                                <table>
                                    <tr>
                                        <td>
                                            <asp:Button ID="ButtonAdd" runat="server" Text="Add" CssClass="button_normal" OnClick="ButtonAdd_OnClick" />
                                        </td>
                                        <td>
                                            <%--<asp:Button ID="ButtonModify" runat="server" Text="Modify" CssClass="button_normal" />--%>
                                        </td>
                                        <td>
                                            <asp:Button ID="ButtonApply" runat="server" Text="Apply" CssClass="button_normal" OnClick="ButtonApply_OnClick" />
                                        </td>
                                        <td style="width: 20%">
                                        </td>
                                        <td>
                                            <asp:Button ID="ButtonClear" runat="server" Text="Clear" CssClass="button_normal" OnClick="ButtonClear_OnClick" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </li>
                    </ul>
                </div>
            </li>
        </ul>
    </fieldset>
    <br />
    <fieldset>
        <ul class="form">
            <li>
                <div class="formfield">
                    <table>
                        <tr>
                            <td>
                                <asp:Button ID="buttonAddItemDetails" runat="server" Text="ItemDetails" CssClass="button_normal" OnClick="buttonAddItemDetails_OnClick" />
                            </td>
                            <td>
                             <asp:Button ID="buttonSave" runat="server" Text="Save" CssClass="button_normal" OnClick="buttonSave_OnClick"/>
                               
                            </td>
                            <td>
                               <%-- <asp:Button ID="ItemComponents" runat="server" Text="Item Components" CssClass="button_long" />--%>
                            </td>
                            <td style="width: 20%">
                            </td>
                            <td>
                                <%--<asp:Button ID="buttonConfirm" runat="server" Text="Confirm" CssClass="button_normal" />--%>
                            </td>
                            <td>
                                <asp:Button ID="buttonPrint" runat="server" Text="Print" CssClass="button_normal" />
                            </td>
                        </tr>
                    </table>
                </div>
            </li>
        </ul>
    </fieldset>
</asp:Content>
